import axios from '@/utils/request'

const ApiUrl = '/admin_api/device'

/**
 * @description: 讲解器列表
 */
export function getList(params) {
  return axios.get(`${ApiUrl}/devices/`, {
    params
  })
}

/**
 * @description: 解锁/锁定讲解器
 */
export function deviceLock(data) {
  return axios.post(`${ApiUrl}/change_device_lock/`, data)
}

/**
 * @description: 机柜内讲解器列表
 */
export function getCabinetsList(cabinet_id) {
  return axios.get(`${ApiUrl}/cabinets/${cabinet_id}/devices/`, {
    params: { size: 1000, page: 1 }
  })
}
